// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import './assets/css/shop.css';
import './assets/css/admin.css';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'



Vue.use(ElementUI);

Vue.config.productionTip = false;

/** axios 携带cookie */
axios.defaults.withCredentials = true;

/* 全局属性，方法 */

/** 主机地址 */
Vue.prototype.host = 'http://192.168.9.222:8088';
/**elment 弹窗 */
Vue.prototype.suc = function (message) {
  this.$message({
    showClose: true,
    message,
    type: 'success'
  });
}
Vue.prototype.msg = function (message) {
  this.$message({
    showClose: true,
    message
  })
}
Vue.prototype.error = function (message) {
  this.$message({
    showClose: true,
    message,
    type: 'error'
  });
}


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
